extends "DongHuaPlayerFather.gd"


#并行播放器
var completeCount=0 #已经完成的计数
var completeTarget=0 #需要完成的目标
var players=[]


func play(list):
	completeCount=0
	completeTarget=list.size()-1
	if list.size()<=1:
		emit_signal("complete")
	else:
		list.pop_front()
		for donghua in list:
			playSingle(donghua)
func playSingle(donghua):
	var player=splitDongHua(donghua)
	players.append(player)
func onChildComplete():
	completeCount+=1
	if completeCount>=completeTarget:
		emit_signal("complete")